﻿using SUNRPA.CONTROLS.IMPL.domain.attrubutes;
using SUNRPA.CONTROLS.IMPL.domain.constant;

namespace SUNRPA.CONTROLS.IMPL.domain.flowRunningVar{
    /// <summary>
    /// 存储浏览器打开页面的相关信息
    /// </summary>
    [ClassInfo("网页对象")]
    public class WebPage : RPAVariable{
        //打开这个网页所使用的的浏览器的类型，不同类型需要取得属性不同
        private BrowserType bt;
        //google浏览器打开的网页需要保存的信息
        private int tabId;
        //ie浏览器保存的信息
        //edge浏览器保存的信息

        public BrowserType Bt { 
            get => bt; set => bt = value; 
        }
        public int TabId { 
            get => tabId; set => tabId = value;
        }

        public static WebPage CreateChromeWebPage(int tabId) { 
            WebPage webPage = new WebPage();
            webPage.bt = BrowserType.GOOGLE;
            webPage.tabId = tabId;
            return webPage;
        }
    }
}
